package com.cts.tmall.app.controller;

import com.cts.tmall.biz.service.TelService;
import com.cts.tmall.dal.entity.TmallTel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
@RequestMapping("/api/tel")
public class TelController {

    @Autowired
    private TelService telService;

    @GetMapping
    public Map<String, Object> queryTel(@RequestParam("createUserId") Long createUserId) {
        return telService.queryTel(createUserId);
    }

    @PutMapping
    public Map<String, Object> mergeTel(@RequestBody TmallTel tel) {
        return telService.mergeTel(tel);
    }
}
